<template>
  <div class="bianji">
    <input type="text" v-model="data.zhanghao">
    <input type="text" v-model="data.nicheng">
    <input type="text" v-model="data.pingjun">
    <input type="text" v-model="data.guodi">
    <input type="text" v-model="data.guogao">
    <button @click="store.bianji(data)">点击编辑</button>
  </div>
</template>

<script setup >
import { onMounted, ref } from "vue";
import { useRoute } from "vue-router";
import { push_add } from "../../stores/counter";
let store = push_add();
const route = useRoute();



var data = ref({})


onMounted(() => {
  data.value = JSON.parse(route.query.id);
  console.log(JSON.parse(route.query.id));
})

</script>

<style>
</style>